﻿// Copyright (c) 2011 Blue Onion Software, All rights reserved
using System;
using System.Web.UI;

namespace SimplyWeather
{
    public partial class Change : Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack == false)
            {
                location.Text = Default.GetLocation(Request) ?? string.Empty;
            }
            if (Request.Params["error"] == "1")
            {
                location.Style[HtmlTextWriterStyle.Color] = "#f00";
            }
        }

        protected void Submit_Click(object sender, EventArgs e)
        {
            Response.Redirect("Default.aspx?l=" + location.Text, true);
        }
    }
}